package com.seraph.zys.dao.impl;

import com.seraph.bi.suite.support.domain.pagination.PageBox;
import com.seraph.bi.suite.support.domain.pagination.PageObject;
import com.seraph.zys.dao.PrAcHealthPromotionDAO;
import com.seraph.zys.dao.domain.PrAcHealthPromotion;
import com.seraph.zys.dao.domain.PrAcHealthPromotionExample;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

@Repository
public class PrAcHealthPromotionDAOImpl extends SqlMapClientDaoSupport implements PrAcHealthPromotionDAO {

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public PrAcHealthPromotionDAOImpl() {
        super();
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public Integer insert(PrAcHealthPromotion record) {
        Object newKey = getSqlMapClientTemplate().insert("pr_ac_health_promotion.abatorgenerated_insert", record);
        return (Integer) newKey;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public int updateByPrimaryKey(PrAcHealthPromotion record) {
        int rows = getSqlMapClientTemplate().update("pr_ac_health_promotion.abatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public int updateByPrimaryKeySelective(PrAcHealthPromotion record) {
        int rows = getSqlMapClientTemplate().update("pr_ac_health_promotion.abatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public List selectByExample(PrAcHealthPromotionExample example, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        List list = getSqlMapClientTemplate().queryForList("pr_ac_health_promotion.abatorgenerated_selectByExample", parms);
        return list;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public List selectByExample(PrAcHealthPromotionExample example) {
        return selectByExample(example, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public PrAcHealthPromotion selectByPrimaryKey(Integer id) {
        PrAcHealthPromotion key = new PrAcHealthPromotion();
        key.setId(id);
        PrAcHealthPromotion record = (PrAcHealthPromotion) getSqlMapClientTemplate().queryForObject("pr_ac_health_promotion.abatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public int deleteByExample(PrAcHealthPromotionExample example) {
        int rows = getSqlMapClientTemplate().delete("pr_ac_health_promotion.abatorgenerated_deleteByExample", getExampleParms(example));
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public int deleteByPrimaryKey(Integer id) {
        PrAcHealthPromotion key = new PrAcHealthPromotion();
        key.setId(id);
        int rows = getSqlMapClientTemplate().delete("pr_ac_health_promotion.abatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getIDExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getId_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NULL", "Y");
            } else {
                parms.put("AND_ID_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_ID_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_EQUALS", "Y");
            } else {
                parms.put("AND_ID_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_ID_NOT_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GT", "Y");
            } else {
                parms.put("AND_ID_GT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GE", "Y");
            } else {
                parms.put("AND_ID_GE", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LT", "Y");
            } else {
                parms.put("AND_ID_LT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LE", "Y");
            } else {
                parms.put("AND_ID_LE", "Y");
            }
            parms.put("id", example.getId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getFISCAL_YEARExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getFiscalYear_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getFROM_AREAExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getFromArea_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GT", "Y");
            } else {
                parms.put("AND_FROM_AREA_GT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GE", "Y");
            } else {
                parms.put("AND_FROM_AREA_GE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LT", "Y");
            } else {
                parms.put("AND_FROM_AREA_LT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LIKE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LIKE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getSORT_IDExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getSortId_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GT", "Y");
            } else {
                parms.put("AND_SORT_ID_GT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GE", "Y");
            } else {
                parms.put("AND_SORT_ID_GE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LT", "Y");
            } else {
                parms.put("AND_SORT_ID_LT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LE", "Y");
            } else {
                parms.put("AND_SORT_ID_LE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getac_timeExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getAcTime_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_NULL", "Y");
            } else {
                parms.put("AND_ac_time_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_NOT_NULL", "Y");
            } else {
                parms.put("AND_ac_time_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_EQUALS", "Y");
            } else {
                parms.put("AND_ac_time_EQUALS", "Y");
            }
            parms.put("acTime", example.getAcTime());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_ac_time_NOT_EQUALS", "Y");
            }
            parms.put("acTime", example.getAcTime());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_GT", "Y");
            } else {
                parms.put("AND_ac_time_GT", "Y");
            }
            parms.put("acTime", example.getAcTime());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_GE", "Y");
            } else {
                parms.put("AND_ac_time_GE", "Y");
            }
            parms.put("acTime", example.getAcTime());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_LT", "Y");
            } else {
                parms.put("AND_ac_time_LT", "Y");
            }
            parms.put("acTime", example.getAcTime());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ac_time_LE", "Y");
            } else {
                parms.put("AND_ac_time_LE", "Y");
            }
            parms.put("acTime", example.getAcTime());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getActivity_ContentExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getActivityContent_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_NULL", "Y");
            } else {
                parms.put("AND_Activity_Content_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_NOT_NULL", "Y");
            } else {
                parms.put("AND_Activity_Content_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_EQUALS", "Y");
            } else {
                parms.put("AND_Activity_Content_EQUALS", "Y");
            }
            parms.put("activityContent", example.getActivityContent());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_Activity_Content_NOT_EQUALS", "Y");
            }
            parms.put("activityContent", example.getActivityContent());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_GT", "Y");
            } else {
                parms.put("AND_Activity_Content_GT", "Y");
            }
            parms.put("activityContent", example.getActivityContent());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_GE", "Y");
            } else {
                parms.put("AND_Activity_Content_GE", "Y");
            }
            parms.put("activityContent", example.getActivityContent());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_LT", "Y");
            } else {
                parms.put("AND_Activity_Content_LT", "Y");
            }
            parms.put("activityContent", example.getActivityContent());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_LE", "Y");
            } else {
                parms.put("AND_Activity_Content_LE", "Y");
            }
            parms.put("activityContent", example.getActivityContent());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_Activity_Content_LIKE", "Y");
            } else {
                parms.put("AND_Activity_Content_LIKE", "Y");
            }
            parms.put("activityContent", example.getActivityContent());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getSUPPORTERSExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getSupporters_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_NULL", "Y");
            } else {
                parms.put("AND_SUPPORTERS_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_NOT_NULL", "Y");
            } else {
                parms.put("AND_SUPPORTERS_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_EQUALS", "Y");
            } else {
                parms.put("AND_SUPPORTERS_EQUALS", "Y");
            }
            parms.put("supporters", example.getSupporters());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SUPPORTERS_NOT_EQUALS", "Y");
            }
            parms.put("supporters", example.getSupporters());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_GT", "Y");
            } else {
                parms.put("AND_SUPPORTERS_GT", "Y");
            }
            parms.put("supporters", example.getSupporters());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_GE", "Y");
            } else {
                parms.put("AND_SUPPORTERS_GE", "Y");
            }
            parms.put("supporters", example.getSupporters());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_LT", "Y");
            } else {
                parms.put("AND_SUPPORTERS_LT", "Y");
            }
            parms.put("supporters", example.getSupporters());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_LE", "Y");
            } else {
                parms.put("AND_SUPPORTERS_LE", "Y");
            }
            parms.put("supporters", example.getSupporters());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUPPORTERS_LIKE", "Y");
            } else {
                parms.put("AND_SUPPORTERS_LIKE", "Y");
            }
            parms.put("supporters", example.getSupporters());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getMAKE_NUMExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getMakeNum_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_NULL", "Y");
            } else {
                parms.put("AND_MAKE_NUM_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_MAKE_NUM_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_MAKE_NUM_EQUALS", "Y");
            }
            parms.put("makeNum", example.getMakeNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_MAKE_NUM_NOT_EQUALS", "Y");
            }
            parms.put("makeNum", example.getMakeNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_GT", "Y");
            } else {
                parms.put("AND_MAKE_NUM_GT", "Y");
            }
            parms.put("makeNum", example.getMakeNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_GE", "Y");
            } else {
                parms.put("AND_MAKE_NUM_GE", "Y");
            }
            parms.put("makeNum", example.getMakeNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_LT", "Y");
            } else {
                parms.put("AND_MAKE_NUM_LT", "Y");
            }
            parms.put("makeNum", example.getMakeNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_MAKE_NUM_LE", "Y");
            } else {
                parms.put("AND_MAKE_NUM_LE", "Y");
            }
            parms.put("makeNum", example.getMakeNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getTOTAL_NUMExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getTotalNum_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_NULL", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_EQUALS", "Y");
            }
            parms.put("totalNum", example.getTotalNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_NOT_EQUALS", "Y");
            }
            parms.put("totalNum", example.getTotalNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_GT", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_GT", "Y");
            }
            parms.put("totalNum", example.getTotalNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_GE", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_GE", "Y");
            }
            parms.put("totalNum", example.getTotalNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_LT", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_LT", "Y");
            }
            parms.put("totalNum", example.getTotalNum());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TOTAL_NUM_LE", "Y");
            } else {
                parms.put("AND_TOTAL_NUM_LE", "Y");
            }
            parms.put("totalNum", example.getTotalNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getUNIT_PRICEExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getUnitPrice_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_NULL", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_EQUALS", "Y");
            }
            parms.put("unitPrice", example.getUnitPrice());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("unitPrice", example.getUnitPrice());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_GT", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_GT", "Y");
            }
            parms.put("unitPrice", example.getUnitPrice());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_GE", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_GE", "Y");
            }
            parms.put("unitPrice", example.getUnitPrice());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_LT", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_LT", "Y");
            }
            parms.put("unitPrice", example.getUnitPrice());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_UNIT_PRICE_LE", "Y");
            } else {
                parms.put("AND_UNIT_PRICE_LE", "Y");
            }
            parms.put("unitPrice", example.getUnitPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getFEEExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        switch (example.getFee_Indicator()) {
        case PrAcHealthPromotionExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_NULL", "Y");
            } else {
                parms.put("AND_FEE_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_NOT_NULL", "Y");
            } else {
                parms.put("AND_FEE_NOT_NULL", "Y");
            }
            break;
        case PrAcHealthPromotionExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_EQUALS", "Y");
            } else {
                parms.put("AND_FEE_EQUALS", "Y");
            }
            parms.put("fee", example.getFee());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FEE_NOT_EQUALS", "Y");
            }
            parms.put("fee", example.getFee());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_GT", "Y");
            } else {
                parms.put("AND_FEE_GT", "Y");
            }
            parms.put("fee", example.getFee());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_GE", "Y");
            } else {
                parms.put("AND_FEE_GE", "Y");
            }
            parms.put("fee", example.getFee());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_LT", "Y");
            } else {
                parms.put("AND_FEE_LT", "Y");
            }
            parms.put("fee", example.getFee());
            break;
        case PrAcHealthPromotionExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FEE_LE", "Y");
            } else {
                parms.put("AND_FEE_LE", "Y");
            }
            parms.put("fee", example.getFee());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    private Map getExampleParms(PrAcHealthPromotionExample example) {
        Map parms = new HashMap();
        parms.putAll(getIDExampleParms(example));
        parms.putAll(getFISCAL_YEARExampleParms(example));
        parms.putAll(getFROM_AREAExampleParms(example));
        parms.putAll(getSORT_IDExampleParms(example));
        parms.putAll(getac_timeExampleParms(example));
        parms.putAll(getActivity_ContentExampleParms(example));
        parms.putAll(getSUPPORTERSExampleParms(example));
        parms.putAll(getMAKE_NUMExampleParms(example));
        parms.putAll(getTOTAL_NUMExampleParms(example));
        parms.putAll(getUNIT_PRICEExampleParms(example));
        parms.putAll(getFEEExampleParms(example));
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public int selectCountByExample(PrAcHealthPromotionExample example) {
        Map parms = getExampleParms(example);
        int count = ((Integer)getSqlMapClientTemplate().queryForObject("pr_ac_health_promotion.abatorgenerated_selectCountByExample", parms)).intValue();
        return count;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public PageBox selectByExampleWithPaging(PrAcHealthPromotionExample example, int pageSize, int pageNum, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        PageBox pageBox = new PageBox();
        PageObject pageObject = new PageObject();
        pageObject.setPageSize(pageSize);
        pageObject.setPageIndex(pageNum);
        int itemAmount = selectCountByExample(example);
        pageObject.setItemAmount(itemAmount);
        List pageList = null;
        if (pageObject.getBeginIndex() <= pageObject.getItemAmount()) {
            pageList = (getSqlMapClientTemplate().queryForList("pr_ac_health_promotion.abatorgenerated_selectByExample", parms, pageObject.getBeginIndex() - 1, pageSize));
        }
        pageBox.setPageObject(pageObject);
        pageBox.setPageList(pageList);
        return pageBox;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public PageBox selectByExampleWithPaging(PrAcHealthPromotionExample example, int pageSize, int pageNum) {
        return selectByExampleWithPaging(example, pageSize, pageNum, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pr_ac_health_promotion
     *
     * @abatorgenerated Tue Apr 17 10:39:39 CST 2012
     */
    public int updateByPrimaryKeyForCgs(PrAcHealthPromotion record) {
        int rows = getSqlMapClientTemplate().update("pr_ac_health_promotion.abatorgenerated_updateByPrimaryKeyForCgs", record);
        return rows;
    }
}